package cn.iocoder.yudao.module.bpm.controller.admin.tohandle.sourceconfig.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 审批流待办中心——来源系统配置 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class BpmHandleSourceConfigBaseVO {

    @Schema(description = "来源系统名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String sourceSystem;

    @Schema(description = "拼接规则")
    private String sourceUrlRule;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime updateTime;

    @Schema(description = "false 有效；true 删除", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    private Boolean deleted = false;

    @Schema(description = "1 正式；2 测试", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "1 正式；2 测试不能为空")
    private Integer testFlag = 1;

}
